.class public Lcom/noshufou/android/su/HomeActivity$PagerAdapter;
.super Landroid/support/v4/app/FragmentPagerAdapter;
.source "HomeActivity.java"

# interfaces
.implements Landroid/support/v4/view/ViewPager$OnPageChangeListener;
.implements Lcom/noshufou/android/su/widget/PagerHeader$OnHeaderClickListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/noshufou/android/su/HomeActivity;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x9
    name = "PagerAdapter"
.end annotation

.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/noshufou/android/su/HomeActivity$PagerAdapter$PageInfo;
    }
.end annotation


# instance fields
.field private final mContext:Landroid/content/Context;

.field private final mHeader:Lcom/noshufou/android/su/widget/PagerHeader;

.field private final mPager:Landroid/support/v4/view/ViewPager;

.field private final mPages:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Lcom/noshufou/android/su/HomeActivity$PagerAdapter$PageInfo;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method public constructor <init>(Landroid/support/v4/app/FragmentActivity;Landroid/support/v4/view/ViewPager;Lcom/noshufou/android/su/widget/PagerHeader;)V
    .locals 1
    .parameter "activity"
    .parameter "pager"
    .parameter "header"

    .prologue
    .line 222
    invoke-virtual {p1}, Landroid/support/v4/app/FragmentActivity;->getSupportFragmentManager()Landroid/support/v4/app/FragmentManager;

    move-result-object v0

    invoke-direct {p0, v0}, Landroid/support/v4/app/FragmentPagerAdapter;-><init>(Landroid/support/v4/app/FragmentManager;)V

    .line 208
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/noshufou/android/su/HomeActivity$PagerAdapter;->mPages:Ljava/util/ArrayList;

    .line 223
    iput-object p1, p0, Lcom/noshufou/android/su/HomeActivity$PagerAdapter;->mContext:Landroid/content/Context;

    .line 224
    iput-object p2, p0, Lcom/noshufou/android/su/HomeActivity$PagerAdapter;->mPager:Landroid/support/v4/view/ViewPager;

    .line 225
    iput-object p3, p0, Lcom/noshufou/android/su/HomeActivity$PagerAdapter;->mHeader:Lcom/noshufou/android/su/widget/PagerHeader;

    .line 226
    iget-object v0, p0, Lcom/noshufou/android/su/HomeActivity$PagerAdapter;->mHeader:Lcom/noshufou/android/su/widget/PagerHeader;

    invoke-virtual {v0, p0}, Lcom/noshufou/android/su/widget/PagerHeader;->setOnHeaderClickListener(Lcom/noshufou/android/su/widget/PagerHeader$OnHeaderClickListener;)V

    .line 227
    iget-object v0, p0, Lcom/noshufou/android/su/HomeActivity$PagerAdapter;->mPager:Landroid/support/v4/view/ViewPager;

    invoke-virtual {v0, p0}, Landroid/support/v4/view/ViewPager;->setAdapter(Landroid/support/v4/view/PagerAdapter;)V

    .line 228
    iget-object v0, p0, Lcom/noshufou/android/su/HomeActivity$PagerAdapter;->mPager:Landroid/support/v4/view/ViewPager;

    invoke-virtual {v0, p0}, Landroid/support/v4/view/ViewPager;->setOnPageChangeListener(Landroid/support/v4/view/ViewPager$OnPageChangeListener;)V

    .line 229
    return-void
.end method


# virtual methods
.method public addPage(Ljava/lang/Class;I)V
    .locals 1
    .parameter
    .parameter "res"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/Class",
            "<*>;I)V"
        }
    .end annotation

    .prologue
    .line 232
    .local p1, clss:Ljava/lang/Class;,"Ljava/lang/Class<*>;"
    const/4 v0, 0x0

    invoke-virtual {p0, p1, v0, p2}, Lcom/noshufou/android/su/HomeActivity$PagerAdapter;->addPage(Ljava/lang/Class;Landroid/os/Bundle;I)V

    .line 233
    return-void
.end method

.method public addPage(Ljava/lang/Class;Landroid/os/Bundle;I)V
    .locals 2
    .parameter
    .parameter "args"
    .parameter "res"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/Class",
            "<*>;",
            "Landroid/os/Bundle;",
            "I)V"
        }
    .end annotation

    .prologue
    .line 240
    .local p1, clss:Ljava/lang/Class;,"Ljava/lang/Class<*>;"
    const/4 v0, 0x0

    iget-object v1, p0, Lcom/noshufou/android/su/HomeActivity$PagerAdapter;->mContext:Landroid/content/Context;

    invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    invoke-virtual {v1, p3}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p0, p1, v0, v1}, Lcom/noshufou/android/su/HomeActivity$PagerAdapter;->addPage(Ljava/lang/Class;Landroid/os/Bundle;Ljava/lang/String;)V

    .line 241
    return-void
.end method

.method public addPage(Ljava/lang/Class;Landroid/os/Bundle;Ljava/lang/String;)V
    .locals 3
    .parameter
    .parameter "args"
    .parameter "title"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/Class",
            "<*>;",
            "Landroid/os/Bundle;",
            "Ljava/lang/String;",
            ")V"
        }
    .end annotation

    .prologue
    .line 244
    .local p1, clss:Ljava/lang/Class;,"Ljava/lang/Class<*>;"
    new-instance v0, Lcom/noshufou/android/su/HomeActivity$PagerAdapter$PageInfo;

    invoke-direct {v0, p1, p2}, Lcom/noshufou/android/su/HomeActivity$PagerAdapter$PageInfo;-><init>(Ljava/lang/Class;Landroid/os/Bundle;)V

    .line 245
    .local v0, info:Lcom/noshufou/android/su/HomeActivity$PagerAdapter$PageInfo;
    iget-object v1, p0, Lcom/noshufou/android/su/HomeActivity$PagerAdapter;->mPages:Ljava/util/ArrayList;

    invoke-virtual {v1, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 246
    iget-object v1, p0, Lcom/noshufou/android/su/HomeActivity$PagerAdapter;->mHeader:Lcom/noshufou/android/su/widget/PagerHeader;

    const/4 v2, 0x0

    invoke-virtual {v1, v2, p3}, Lcom/noshufou/android/su/widget/PagerHeader;->add(ILjava/lang/String;)V

    .line 247
    invoke-virtual {p0}, Lcom/noshufou/android/su/HomeActivity$PagerAdapter;->notifyDataSetChanged()V

    .line 248
    return-void
.end method

.method public addPage(Ljava/lang/Class;Ljava/lang/String;)V
    .locals 1
    .parameter
    .parameter "title"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/Class",
            "<*>;",
            "Ljava/lang/String;",
            ")V"
        }
    .end annotation

    .prologue
    .line 236
    .local p1, clss:Ljava/lang/Class;,"Ljava/lang/Class<*>;"
    const/4 v0, 0x0

    invoke-virtual {p0, p1, v0, p2}, Lcom/noshufou/android/su/HomeActivity$PagerAdapter;->addPage(Ljava/lang/Class;Landroid/os/Bundle;Ljava/lang/String;)V

    .line 237
    return-void
.end method

.method public getCount()I
    .locals 1

    .prologue
    .line 252
    iget-object v0, p0, Lcom/noshufou/android/su/HomeActivity$PagerAdapter;->mPages:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    return v0
.end method

.method public getItem(I)Landroid/support/v4/app/Fragment;
    .locals 4
    .parameter "position"

    .prologue
    .line 257
    iget-object v1, p0, Lcom/noshufou/android/su/HomeActivity$PagerAdapter;->mPages:Ljava/util/ArrayList;

    invoke-virtual {v1, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/noshufou/android/su/HomeActivity$PagerAdapter$PageInfo;

    .line 258
    .local v0, info:Lcom/noshufou/android/su/HomeActivity$PagerAdapter$PageInfo;
    iget-object v1, p0, Lcom/noshufou/android/su/HomeActivity$PagerAdapter;->mContext:Landroid/content/Context;

    #getter for: Lcom/noshufou/android/su/HomeActivity$PagerAdapter$PageInfo;->clss:Ljava/lang/Class;
    invoke-static {v0}, Lcom/noshufou/android/su/HomeActivity$PagerAdapter$PageInfo;->access$0(Lcom/noshufou/android/su/HomeActivity$PagerAdapter$PageInfo;)Ljava/lang/Class;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/Class;->getName()Ljava/lang/String;

    move-result-object v2

    #getter for: Lcom/noshufou/android/su/HomeActivity$PagerAdapter$PageInfo;->args:Landroid/os/Bundle;
    invoke-static {v0}, Lcom/noshufou/android/su/HomeActivity$PagerAdapter$PageInfo;->access$1(Lcom/noshufou/android/su/HomeActivity$PagerAdapter$PageInfo;)Landroid/os/Bundle;

    move-result-object v3

    invoke-static {v1, v2, v3}, Landroid/support/v4/app/Fragment;->instantiate(Landroid/content/Context;Ljava/lang/String;Landroid/os/Bundle;)Landroid/support/v4/app/Fragment;

    move-result-object v1

    return-object v1
.end method

.method public onHeaderClicked(I)V
    .locals 0
    .parameter "position"

    .prologue
    .line 278
    return-void
.end method

.method public onHeaderSelected(I)V
    .locals 1
    .parameter "position"

    .prologue
    .line 282
    iget-object v0, p0, Lcom/noshufou/android/su/HomeActivity$PagerAdapter;->mPager:Landroid/support/v4/view/ViewPager;

    invoke-virtual {v0, p1}, Landroid/support/v4/view/ViewPager;->setCurrentItem(I)V

    .line 283
    return-void
.end method

.method public onPageScrollStateChanged(I)V
    .locals 0
    .parameter "state"

    .prologue
    .line 273
    return-void
.end method

.method public onPageScrolled(IFI)V
    .locals 1
    .parameter "position"
    .parameter "positionOffset"
    .parameter "positionOffsetPixels"

    .prologue
    .line 263
    iget-object v0, p0, Lcom/noshufou/android/su/HomeActivity$PagerAdapter;->mHeader:Lcom/noshufou/android/su/widget/PagerHeader;

    invoke-virtual {v0, p1, p2, p3}, Lcom/noshufou/android/su/widget/PagerHeader;->setPosition(IFI)V

    .line 264
    return-void
.end method

.method public onPageSelected(I)V
    .locals 1
    .parameter "position"

    .prologue
    .line 268
    iget-object v0, p0, Lcom/noshufou/android/su/HomeActivity$PagerAdapter;->mHeader:Lcom/noshufou/android/su/widget/PagerHeader;

    invoke-virtual {v0, p1}, Lcom/noshufou/android/su/widget/PagerHeader;->setDisplayedPage(I)V

    .line 269
    return-void
.end method
